package com.lovergreen.person.service;

import com.lovergreen.person.dao.PersonDao;
import com.lovergreen.person.model.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PersonServiceImpl implements PersonService {
	@Autowired
	PersonDao personDao;
	@Override
	public Person getPerson(String email) {return personDao.getPerson(email);}
	@Override
	public void updatePerson(Person person) {
		personDao.updatePerson(person);
	}
	@Override
	public List listPerson() {return personDao.listPersons();}
	@Override
	public void deletePerson(String email) { personDao.deletePerson(email);	}
	@Override
	public void addPerson(Person person) { personDao.addPerson(person);	}
	@Override
	public Person getPersonByUid(String confirmkey) { return personDao.getPersonByUid(confirmkey);}

}
